home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_tem_ambwaterfall.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  64 lines

  1. # Jones 3D Cog Script
  2. #
  3. # TEM_AmbWaterFall.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message     entered
  13.     
  14.     thing       bot_Pos
  15.     thing       top_Pos
  16.     
  17.     sector      start_Amb1      linkID=1
  18.     sector      start_Amb2      linkID=1
  19.     sector      start_Amb3      linkID=1
  20.     sector      start_Amb4      linkID=1
  21.     
  22.     sector      stop_Amb1       linkID=0
  23.     sector      stop_Amb2       linkID=0
  24.     sector      stop_Amb3       linkID=0
  25.     
  26.     sound       snd_WaterFall=gen_waterfall_a.wav     local
  27.     
  28.     flex        vol=1.0
  29.     flex        min=15.0
  30.     flex        max=25.0
  31.     
  32.     int         top_Loop    local
  33.     int         bot_Loop    local
  34.     int         soundsOn=0  local
  35.     
  36. end
  37.  
  38. # ========================================================================================
  39.  
  40. code
  41.  
  42. entered:
  43.  
  44.     if((GetSenderID() == 1) && (soundsOn == 0))
  45.     {
  46.         soundsOn = 1;
  47.         bot_Loop = PlaySoundThing(snd_WaterFall, bot_Pos, vol, min, max, 0x0001);
  48.         top_Loop = PlaySoundThing(snd_WaterFall, top_Pos, 0.5, min, max, 0x0001);
  49.     }
  50.  
  51.     if((GetSenderID() == 0) && (soundsOn == 1))
  52.     {
  53.         soundsOn = 0;
  54.         StopSound(bot_Loop, 2.0);
  55.         StopSound(top_Loop, 2.0);
  56.     }
  57.     
  58.     return;
  59.  
  60. # ========================================================================================
  61.  
  62. end
  63.  
  64.